package com.chagee.channel.server.entity;

import lombok.AllArgsConstructor;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

@Data
public class User implements Serializable {

    @NotNull
    private Long id;

    @NotEmpty(message = "名字不能为空")
    @Size(max = 20, message = "名字长度不能超过20")
    private String name;

}
